
<button nz-button (click)="addRow()" nzType="primary">Add</button>

<button nz-button (click)="getData()" nzType="primary">getData</button>

<button nz-button (click)="getModified()" nzType="primary">getModified</button>

<button nz-button (click)="getAdded()" nzType="primary">getAdded</button>

<button nz-button (click)="save()" nzType="primary">save</button>

<a href="javascript:void(0);" (click)="test()" nz-button  nzType="primary">button1</a>

<nz-table #editRowTable nzBordered  [nzData]="dataStore">
  <thead>
  <tr>
    <th nzWidth="30%">Name</th>
    <th>Age</th>
    <th>Address</th>
    <th>Action</th>
  </tr>
  </thead>
  <tbody>
  <!--<tr *ngFor="let data of editRowTable.data" class="editable-row">-->
  <tr *ngFor="let data of dataStore" class="editable-row">
    <td>
      <div class="editable-cell" *ngIf="editId !== data.id; else editTpl">
        <div class="editable-cell-value-wrap" (click)="startEdit(data.id, $event)">
          {{ data.name }}
        </div>
      </div>
      <ng-template #editTpl>
        <input type="text" nz-input appFocus [(ngModel)]="data.name"/>
      </ng-template>
    </td>
    <td>
<!--      <div class="editable-cell" *ngIf="editId !== data.id; else ageEditTpl">
        <div class="editable-cell-value-wrap" (click)="startEdit(data.id, $event)">-->
          {{ data.age }}
<!--        </div>
      </div>
      <ng-template #ageEditTpl>
        <nz-input-number [(ngModel)]="data.age" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
      </ng-template>-->
    </td>
    <td>
     <!-- <div class="editable-cell" *ngIf="editId !== data.id; else addressEditTpl">
        <div class="editable-cell-value-wrap" (click)="startEdit(data.id, $event)">-->
          {{ data.address }}
<!--        </div>
      </div>
      <ng-template #addressEditTpl>
        <input type="text" nz-input appFocus [(ngModel)]="data.address"/>
      </ng-template>-->
    </td>
    <td>
      <a nz-popconfirm nzTitle="Sure to delete?" (nzOnConfirm)="deleteRow(data.id)">Delete</a>
    </td>
  </tr>
  </tbody>
</nz-table>
